package com.yang.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.stereotype.Component;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@Table(name = "sys_file")
public class SysFile implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;

    /**
     * 上传原文件名
     */
    @Column(name = "original_file_name")
    private String originalFileName;

    /**
     * 上传文件新名称
     */
    @Column(name = "original_new_file_name")
    private String originalNewFileName;

    /**
     * 上传文件完整路径
     */
    @Column(name = "original_file_path")
    private String originalFilePath;

    /**
     * 输出文件名
     */
    @Column(name = "target_file_name")
    private String targetFileName;

    /**
     * 输出文件完整地址
     */
    @Column(name = "target_file_path")
    private String targetFilePath;

    /**
     * 上传文件入库时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 输出文件入库时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
    @Column(name = "modify_time")
    private Date modifyTime;


}
